package com.example.drugaiservice.config;

import com.baidubce.qianfan.Qianfan;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class QianfanConfiguration {
    @Value("${qianfan.ak}")
    private String ak;
    @Value("${qianfan.sk}")
    private String sk;
    @Bean
    public Qianfan qianfan() {
        log.info("开始注入qianfan信息");
        return new Qianfan(ak, sk);
    }
}
